home *** CD-ROM | disk | FTP | other *** search
/ Ultra Pack / UltraComputing Partner Applications.iso / Faximum / FAXserver / convert / ps < prev    next >
Encoding:
Text File  |  1994-11-16  |  1.1 KB  |  76 lines

  1. #
  2. #  SccsId = @(#)dps    1.3    94/07/08
  3. #
  4. FAXHOME=${FAXHOME:-/opt/FAXserver}
  5. PAPERLENGTH=11
  6. PATH=$FAXHOME/bin:/bin:/usr/bin
  7. RESOLUTION=200
  8. #
  9. #  If you wish to use a Display PostScript server other than the one
  10. #  on the system running the fax server, change the following to 
  11. #  specify the name of the DPS server to use.
  12. #
  13. DISPLAY=localhost:0.0
  14. export FAXHOME PAPERLENGTH PATH RESOLUTION DISPLAY
  15.  
  16. MYNAME=$0
  17. OFILE=
  18. PSARGS=
  19. PSFILE=
  20.  
  21. while [ "$1" != "" ]
  22. do
  23.     case "$1" in
  24.     -s)
  25.         PAPERLENGTH=$2
  26.         if [ "$PAPERLENGTH" = "" ]
  27.         then
  28.             echo $MYNAME: missing paperlength
  29.             exit 1
  30.         fi
  31.         shift
  32.         ;;
  33.  
  34.     -d | -D | -f | -O | -P | -s)
  35.         if [ "$2" = "" ]
  36.         then
  37.             echo $MYNAME: argument to $1 missing
  38.             exit 1
  39.         fi
  40.         PSARGS="$PSARGS $1 $2"
  41.         shift
  42.         ;;
  43.  
  44.     -o)
  45.         if [ "$2" = "" ]
  46.         then
  47.             echo $MYNAME: missing output filename
  48.             exit 1
  49.         fi
  50.         OFILE=$2
  51.         shift
  52.         ;;
  53.  
  54.     -*)
  55.         PSARGS="$PSARGS $1"
  56.         ;;
  57.  
  58.     *)
  59.         if [ "$PSFILE" ]
  60.         then
  61.             OFILE=$1
  62.         else
  63.             PSFILE=$1
  64.         fi
  65.     esac
  66.     shift
  67. done
  68.  
  69. if [ ! "$PSFILE" -o ! "$OFILE" ]
  70. then
  71.     echo usage: $MYNAME '[options]' psfile outputfile
  72.     exit 1
  73. fi
  74.  
  75. dpstiff $PSARGS -o $OFILE $PSFILE
  76.